2008-02-05 Matthias Clasen <mclasen@redhat.com>
* gtk/updateiconcache.c: Install a printerr handler that
prepends the program name, since gtk-update-icon-cache output
often appears in the middle of other output, e.g. rpm update logs.
svn path=/trunk/; revision=19464
+2008-02-05 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/updateiconcache.c: Install a printerr handler that
+ prepends the program name, since gtk-update-icon-cache output
+ often appears in the middle of other output, e.g. rpm update logs.
+
2008-02-05 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkprivate-win32.h
{ NULL }
};
+static void
+printerr_handler (const gchar *string)
+{
+ const gchar *charset;
+
+ fputs (g_get_prgname (), stderr);
+ fputs (": ", stderr);
+ if (g_get_charset (&charset))
+ fputs (string, stderr); /* charset is UTF-8 already */
+ else
+ {
+ gchar *lstring = strdup_convert (string, charset);
+ fputs (lstring, stderr);
+ g_free (lstring);
+
+ fflush (stderr);
+ }
+}
+
+
int
main (int argc, char **argv)
{
if (argc < 2)
return 0;
+
+ g_set_printerr_handler (printerr_handler);
setlocale (LC_ALL, "");